package com.byedu.domain.course;

import com.byedu.domain.focus.vo.FocusUserVO;

import java.io.Serializable;

/**
 * Created by Luo on 2017-08-23.
 */
public class BayUserDO implements Serializable {

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }


    @Override
    public String toString() {
        return "FocusUserDO{" +
                "id='" + id + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", department='" + department + '\'' +
                ", position='" + position + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", permission='" + permission + '\'' +
                '}';
    }

    /*用户编号*/
    private String id;
    /*用户名*/
    private String username;
    /*密码*/
    private String password;
    /*部门*/
    private String department;
    /*职位*/
    private String position;
    /*手机号*/
    private String phone;
    /*邮箱*/
    private String email;
    /*权限*/
    private String permission;

    /*未完成项*/
    private int uf;

    public BayUserDO() {

    }

    public BayUserDO(FocusUserVO focusUserVO) {
        if(focusUserVO != null) {
            this.id = focusUserVO.getId();
            this.username = focusUserVO.getUsername();
            this.password = focusUserVO.getPassword();
            this.department = focusUserVO.getDepartment();
            this.position = focusUserVO.getPosition();
            this.phone = focusUserVO.getPhone();
            this.email = focusUserVO.getEmail();
            this.uf = focusUserVO.getUf();
            this.permission = String.valueOf(focusUserVO.getPermission().getCode());
        }
    }
    public int getUf() {
        return uf;
    }

    public void setUf(int uf) {
        this.uf = uf;
    }
}
